package com.fz.us.oa.core.service.com.impl;

import com.fz.us.admin.base.bean.search.rule.Rule;
import com.fz.us.admin.company.dao.BaseFlowDao;
import com.fz.us.admin.company.service.impl.BaseFlowServiceImpl;
import com.fz.us.admin.dict.entity.DictItem;
import com.fz.us.oa.core.dao.com.DirectorDao;
import com.fz.us.oa.core.entity.com.Director;
import com.fz.us.oa.core.entity.com.Person;
import com.fz.us.oa.core.service.com.DirectorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by dzw on 2018/3/19.
 */
@Service
public class DirectorServiceImpl extends BaseFlowServiceImpl<Director,String> implements DirectorService {

    @Autowired
    private DirectorDao directorDao;

    @Override
    public BaseFlowDao<Director, String> getBaseFlowDao() {
        return directorDao;
    }

    @Override
    public List<Director> findPerson(List<Rule> rules) {
        return directorDao.findPerson(rules);
    }

    @Override
    public int getCountEduAll(DictItem edu) {
        return directorDao.getCountEduAll(edu);
    }

    @Override
    public int getCountEduAll(DictItem edu, DictItem street) {
        return directorDao.getCountEduAll(edu, street);
    }

    @Override
    public int getCountByPersonNature(DictItem personNature) {
        return directorDao.getCountByPersonNature(personNature);
    }

    @Override
    public int getCountByNatureAndStreet(DictItem personNature, DictItem street) {
        return directorDao.getCountByNatureAndStreet(personNature, street);
    }

    @Override
    public int getAllCount() {
        return directorDao.getAllCount();
    }

    @Override
    public int getCountByStreet(DictItem street) {
        return directorDao.getCountByStreet(street);
    }

    @Override
    public int getCountByGender(String gender) {
        return directorDao.getCountByGender(gender);
    }

    @Override
    public Director getByKeyId(String keyId) {
        return directorDao.getByKeyId(keyId);
    }
}
